﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="OracleTools.OracleHomeSelector.HomeInfoForm"
    Title="Home Info" Height="493" Width="703" Icon="Resources/App2.ico" ShowInTaskbar="False" WindowStartupLocation="CenterOwner" Background="{DynamicResource {x:Static SystemColors.MenuBarBrushKey}}" mc:Ignorable="d" ResizeMode="NoResize">
	<Window.Resources>
		
		<Style x:Key="styleLabel" TargetType="{x:Type Label}">
			<Setter Property="Width" Value="90"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="HorizontalContentAlignment" Value="Right"/>	
		</Style>
		
		<Style x:Key="styleRow" TargetType="{x:Type StackPanel}">
			<Setter Property="Margin" Value="0,4,0,0"/>
		</Style>
		
		<Style x:Key="HomeListItemTemplate" TargetType="{x:Type ListBoxItem}">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
			<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
			<Setter Property="Padding" Value="2,0,0,0"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type ListBoxItem}">
						<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
							<StackPanel Orientation="Vertical"
								HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
								SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
								VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
								<!--<ContentPresenter
									HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
									SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
									VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>-->
								<Image Source="Resources\DatabaseIcon.png"/>
								<TextBlock Text="{Binding Name, Mode=OneWay}"/>
							</StackPanel>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="IsSelected" Value="true">
								<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
								<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
							</Trigger>
							<MultiTrigger>
								<MultiTrigger.Conditions>
									<Condition Property="IsSelected" Value="true"/>
									<Condition Property="Selector.IsSelectionActive" Value="false"/>
								</MultiTrigger.Conditions>
								<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
								<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
							</MultiTrigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</Window.Resources>

	<Grid Margin="0,0,2,0">
		<TabControl x:Name="tabControl" Margin="4,4,8,8">
			<TabItem x:Name="tabHomeInfo" Header="Home Info" Height="22.96" Margin="-2,0,-2,-1" VerticalAlignment="Bottom">
				<Grid Background="#FFE5E5E5" Margin="0,0,-3,-3">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="181"/>
						<ColumnDefinition/>
					</Grid.ColumnDefinitions>
					<ListBox x:Name="lstHomes" Margin="8" ItemContainerStyle="{DynamicResource HomeListItemTemplate}"/>
					<StackPanel Orientation="Vertical" d:LayoutOverrides="Height" Grid.Column="1" Margin="0,4,0,0">
						<StackPanel Orientation="Horizontal" d:LayoutOverrides="Width" Style="{DynamicResource styleRow}">
<!-- Name -->
							<Label Content="Name:" Style="{DynamicResource styleLabel}"/>
							<TextBox x:Name="txtName" Width="200" TextWrapping="Wrap" Text="{Binding Name, Mode=OneWay}" IsReadOnly="True"/>
						</StackPanel>
						<StackPanel Orientation="Horizontal" Style="{DynamicResource styleRow}">
							<Label Content="Version:" Style="{DynamicResource styleLabel}"/>
							<TextBox x:Name="txtVersion" IsReadOnly="True" Width="100"/>
							<TextBox x:Name="txtArchitecture" TextWrapping="Wrap" IsReadOnly="True" Width="50" Margin="4,0,0,0"/>
						</StackPanel>
						<StackPanel Orientation="Horizontal" d:LayoutOverrides="Width" Style="{DynamicResource styleRow}">
<!-- Bundle Name -->
							<Label Content="Bundle Name:" Style="{DynamicResource styleLabel}"/>
							<TextBox x:Name="txtBundleName" Text="{Binding BundleName, Mode=OneWay}" TextWrapping="Wrap" IsReadOnly="True" Width="200" d:LayoutOverrides="Height"/>
						</StackPanel>
						<StackPanel Orientation="Horizontal" d:LayoutOverrides="Width" Style="{DynamicResource styleRow}">
<!-- Group Name -->
							<Label Content="Group Name:" Style="{DynamicResource styleLabel}"/>
							<TextBox x:Name="txtGroupName" Text=" " TextWrapping="Wrap" IsReadOnly="True" Width="200"/>
						</StackPanel>
						<StackPanel Orientation="Horizontal" d:LayoutOverrides="Width" Style="{DynamicResource styleRow}">
<!-- NLS -->
							<Label Content="NLS:" Style="{DynamicResource styleLabel}"/>
							<TextBox x:Name="txtNLS" Text=" " TextWrapping="Wrap" IsReadOnly="True" Width="225.878"/>
						</StackPanel>
						<StackPanel Orientation="Horizontal" d:LayoutOverrides="Width" Style="{DynamicResource styleRow}">
<!-- Path -->
							<Label Content="Path:" Style="{DynamicResource styleLabel}"/>
							<TextBox x:Name="txtPath" Text=" " TextWrapping="Wrap" IsReadOnly="True" Width="267.878"/>
							<Button x:Name="cmdOpenPath" Width="38.001" Content="Open" Margin="4,0,0,0"/>
						</StackPanel>
						<StackPanel Orientation="Horizontal" d:LayoutOverrides="Width" Style="{DynamicResource styleRow}">
<!-- tnsnames.ora -->
							<Label Content="tnsnames.ora:" Style="{DynamicResource styleLabel}"/>
							<TextBox x:Name="txtTnsOra" Text=" " IsReadOnly="True" Width="344.544"/>
							<Button x:Name="cmdOpenTns" Width="38.001" Content="Open" Margin="4,0,0,0"/>
						</StackPanel>
						<StackPanel Orientation="Horizontal" d:LayoutOverrides="Width" Style="{DynamicResource styleRow}">
<!-- sqlnet.ora -->
							<Label Content="sqlnet.ora:" Style="{DynamicResource styleLabel}"/>
							<TextBox x:Name="txtSqlNet" Text=" " IsReadOnly="True" Width="344.544"/>
							<Button x:Name="cmdOpenSqlNet" Width="38.001" Content="Open" Margin="4,0,0,0"/>
							<Button x:Name="cmdEditSqlNet" Width="38.001" Content="Edit" Margin="4,0,0,0" Visibility="Collapsed"/>
						</StackPanel>
						<StackPanel Orientation="Horizontal" d:LayoutOverrides="Width" Style="{DynamicResource styleRow}">
<!-- ldap.ora -->
							<Label Content="ldap.ora:" Style="{DynamicResource styleLabel}"/>
							<TextBox x:Name="txtLdapOra" IsReadOnly="True" Width="344.544"/>
							<Button x:Name="cmdOpenLdap" Width="38.001" Content="Open" Margin="4,0,0,0"/>
						</StackPanel>
						<StackPanel Orientation="Horizontal" d:LayoutOverrides="Width" Style="{DynamicResource styleRow}">
<!-- OLEDB -->
							<Label Content="OLEDB:" Style="{DynamicResource styleLabel}"/>
							<TextBox x:Name="txtOLEDB" IsReadOnly="True" Width="267.878"/>
						</StackPanel>
						<StackPanel Orientation="Horizontal" Style="{DynamicResource styleRow}">
<!-- OO4O -->
							<Label Content="OO4O:" Style="{DynamicResource styleLabel}"/>
							<TextBox x:Name="txtOO4O" IsReadOnly="True" Width="267.878"/>
						</StackPanel>
					</StackPanel>
				</Grid>
			</TabItem>
			<TabItem x:Name="tabFileSync" Header="File Sync">
				<ScrollViewer>
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="25"/>
							<RowDefinition Height="0.442*"/>
							<RowDefinition Height="25"/>
							<RowDefinition Height="0.497*"/>
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="557"/>
							<ColumnDefinition/>
						</Grid.ColumnDefinitions>
						<ListView x:Name="lstTns" Margin="0,0,4,4" Grid.Row="1" SelectionMode="Single">
							<ListView.View>
								<GridView>
									<GridViewColumn DisplayMemberBinding="{Binding HomeName}" Header="Home" Width="200"/>
									<GridViewColumn DisplayMemberBinding="{Binding LastModifiedDate}" Header="Modified" Width="180"/>
									<GridViewColumn DisplayMemberBinding="{Binding Size}" Header="Size" Width="100"/>
								</GridView>
							</ListView.View>
						</ListView>
						<Button x:Name="cmdCopySelectedTns" Content="Copy to all" Grid.Column="1" Height="30.04" Margin="8,0,0,0" Grid.Row="1" VerticalAlignment="Top" IsEnabled="False" HorizontalAlignment="Left" Width="70.435"/>
						<ListView x:Name="lstSql" Margin="0,4,4,4" Grid.Row="3" SelectionMode="Single">
							<ListView.View>
								<GridView>
									<GridViewColumn DisplayMemberBinding="{Binding HomeName}" Header="Home" Width="200"/>
									<GridViewColumn DisplayMemberBinding="{Binding LastModifiedDate}" Header="Modified" Width="180"/>
									<GridViewColumn DisplayMemberBinding="{Binding Size}" Header="Size" Width="100"/>
								</GridView>
							</ListView.View>
						</ListView>
						<TextBlock HorizontalAlignment="Left" Margin="8,2,0,2" Grid.Row="2" TextWrapping="Wrap" Text="sqlnet.ora:" Width="106" VerticalAlignment="Center"/>
						<TextBlock HorizontalAlignment="Left" Margin="8,2,0,2" TextWrapping="Wrap" Text="tnsnames.ora:" Width="151" VerticalAlignment="Center"/>
						<Button x:Name="cmdCopySelectedSql" Content="Copy to all" Grid.Column="1" Height="30.04" Margin="8,4,0,0" Grid.Row="3" VerticalAlignment="Top" IsEnabled="False" HorizontalAlignment="Left" Width="70.435"/>
					</Grid>
				</ScrollViewer>
			</TabItem>
		</TabControl>
				
	</Grid>
</Window>
